//
//  TimeInComeDetailViewController.swift
//  TinyShopKeeper
//
//  Created by rimi on 16/6/12.
//  Copyright © 2016年 yuying. All rights reserved.
//

import UIKit

class TimeInComeDetailViewController: UIViewController {

    
    //MARK:---
    //查询店铺
    var selectedShopId:String!
    //时间段
    var searchTime:String!
    //查询的是否单店铺
    var searchSingleShopSign:Bool!
    //时段收入title
    var hourIncomeTitle:String!
    
    
    override func viewDidLoad() {
        super.viewDidLoad()

        self.title = "详情界面"
       
        let pieChartView = PieCharView(frame: CGRectMake(0, 100, ScreenWidth, ScreenWidth))
        pieChartView.valueStore = ["10","20","30","40"]
        pieChartView.titleStore = ["东南","西南","东北","西北"]
        pieChartView.title = "所有地区"
        pieChartView.sumIncome = 100
        pieChartView.colorStore = chartColorByCount(pieChartView.valueStore.count)
        view.addSubview(pieChartView)
        
        pieChartView.callBack = {
        [unowned self] (index,selectSign) in
            if selectSign{
                print("选中一个layer")
            }else{
                print("取消选中一个layer，并且没有一个layer被选中")
            }
        }
        pieChartView.stroke()
    
    }

    override func didReceiveMemoryWarning() {
        super.didReceiveMemoryWarning()
        // Dispose of any resources that can be recreated.
    }
    

    /*
    // MARK: - Navigation

    // In a storyboard-based application, you will often want to do a little preparation before navigation
    override func prepareForSegue(segue: UIStoryboardSegue, sender: AnyObject?) {
        // Get the new view controller using segue.destinationViewController.
        // Pass the selected object to the new view controller.
    }
    */

}
